package com.kung.qvs.entity;

import org.greenrobot.greendao.annotation.Transient;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;

public class KRecordWeight {
    private SimpleDateFormat sdf_show = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");  //设置日期格式
    /** 称重记录id */
    private String recordId;

    /** 产品id */
//    @Excel(name = "产品id")
    private String productId;

    /** 产品名称 */
//    @Excel(name = "产品名称")
    private String productName;

    /** 员工id */
//    @Excel(name = "员工id")
    private Long userId;

    /** 员工账号 */
//    @Excel(name = "员工账号")
    private String userName;

    /** 员工名称 */
//    @Excel(name = "员工名称")
    private String userNikename;

    /** 重量 */
//    @Excel(name = "重量")
    private String weight;

    /** 换算个数 */
//    @Excel(name = "换算个数")
    private String conversion;

    private String amount;

    private Date createTime;
    private String fcdate;

    /** 称重员（秤登录者） */
//    @Excel(name = "称重员", readConverterExp = "秤=登录者")
    private String operator;

    private String companyName;

    /** 规格 */
    private String specification;
    private String nums;

    @Transient
    private String index;
    @Transient
    private String indexName;

    private String listing;

    public String getIndex() {
        return index;
    }

    public void setIndex(String index) {
        this.index = index;
    }

    public String getIndexName() {
        return indexName;
    }

    public void setIndexName(String indexName) {
        this.indexName = indexName;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getSpecification() {
        return specification;
    }

    public void setSpecification(String specification) {
        this.specification = specification;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getFcdate() {
        return sdf_show.format(createTime);
    }

    public void setFcdate(String fcdate) {
        this.fcdate = fcdate;
    }

    public String getRecordId() {
        return recordId;
    }

    public void setRecordId(String recordId) {
        this.recordId = recordId;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserNikename() {
        return userNikename;
    }

    public void setUserNikename(String userNikename) {
        this.userNikename = userNikename;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }

    public String getConversion() {
        return conversion;
    }

    public void setConversion(String conversion) {
        this.conversion = conversion;
    }

    public String getAmount() {
        return amount;
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public String getNums() {
        return nums;
    }

    public void setNums(String nums) {
        this.nums = nums;
    }

    public String getListing() {
        if (listing == null) {
            listing = "";
        } else if (listing.equals("1")) {
            listing = "是";
        } else if (listing.equals("0")) {
            listing = "否";
        }
        return listing;
    }

    public void setListing(String listing) {
        this.listing = listing;
    }
}
